home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / OGRID110 / DEMOMAKE.PAS < prev    next >
Pascal/Delphi Source File  |  1995-06-01  |  20KB  |  469 lines

  1. {*****************************************************************************
  2.  
  3.   OOGrid Library(TM) for Borland/Turbo Pascal (Real Mode/TV)
  4.   Copyright (C) 1994, 1995 by Arturo J. Monge
  5.   Portions Copyright (C) 1989,1990 Borland International, Inc.
  6.  
  7.   OOGrid Library(TM) Make Demo Resources program:
  8.     Creates the resource file used by DEMO_GL.PAS.  Example of
  9.     how to use the resource functions in GLTVR_US.PAS.
  10.  
  11.   Last Modification : December 29th, 1994
  12.  
  13. *****************************************************************************}
  14.  
  15. program DemoMake;
  16.  
  17. uses Objects, Drivers, Menus, Views, Dialogs, StdDlg, GLViews, GLEquate,
  18.      GLTVR_US, DemoEqu;
  19.  
  20. var
  21.   ResFile : TResourceFile;
  22.  
  23. {** Resource Procedures **}
  24.  
  25. procedure CreateStrings;
  26. var
  27.   S: PStrListMaker;
  28. begin
  29.   S := New(PStrListMaker, Init(10000, 100));
  30.  
  31. { Menu Hints }
  32.  
  33.   S^.Put(hcYes, 'Perform the action');
  34.   S^.Put(hcNo, 'Do not perform the action');
  35.   S^.Put(hcOk, 'Accept the settings in this dialog');
  36.   S^.Put(hcCancel, 'Close the dialog box without making any changes.');
  37.   S^.Put(hcDeleteWin, 'Delete from the desktop the selected window');
  38.   S^.Put(hcWinList, 'Use the cursor keys to examine the window list');
  39.   S^.Put(hcFileMenu, 'File management commands (New, Open, Save, etc.)');
  40.   S^.Put(hcNewSheet, 'Create an empty spreadsheet in a new window');
  41.   S^.Put(hcOpen, 'Locate and open a saved spreadsheet');
  42.   S^.Put(hcSave, 'Save the current spreadsheet');
  43.   S^.Put(hcSaveAs, 'Save the current spreadsheet under a different name');
  44.   S^.Put(hcPrintSheet, 'Print the current spreadsheet');
  45.   S^.Put(hcClose, 'Close the current spreadsheet');
  46.   S^.Put(hcCloseAll, 'Close all open spreadsheets');
  47.   S^.Put(hcDosShell, 'Temporarily exit to DOS');
  48.   S^.Put(hcQuit, 'Close the application and return to DOS');
  49.   S^.Put(hcEditMenu, 'Edit commands');
  50.   S^.Put(hcGoto, 'Move the cursor to a different cell in the spreadsheet');
  51.   S^.Put(hcEditCell, 'Edit the data in the highlighted cell');
  52.   S^.Put(hcCopy, 'Copy the selected cells to a different position');
  53.   S^.Put(hcMove, 'Move the selected cells to a different position');
  54.   S^.Put(hcClear, 'Erase the data of the selected cells');
  55.   S^.Put(hcPaste, 'Paste the selected cells where indicated by the cursor');
  56.   S^.Put(hcSpreadSheetMenu, 'Spreadsheet managenent commands');
  57.   S^.Put(hcFormatCells, 'Format the selected cells');
  58.   S^.Put(hcRecalc, 'Recalculate the values of all the cells');
  59.   S^.Put(hcToggleAutoCalc, 'Turn on/off the autocalc mode');
  60.   S^.Put(hcToggleFormulas, 'Turn on/off display of formulas');
  61.   S^.Put(hcToggleHeaders, 'Turn on/off display of custom assigned headers');
  62.   S^.Put(hcProtectionMenu, 'Spreadsheet protection commands');
  63.   S^.Put(hcToggleProtection, 'Turn on/off spreadsheet protection');
  64.   S^.Put(hcSetUnlocked, 'Mark the selected cells as unlocked');
  65.   S^.Put(hcSetLocked, 'Mark the selected cells as locked');
  66.   S^.Put(hcColumnMenu, 'Column management commands');
  67.   S^.Put(hcInsertColumns, 'Insert a column in the indicated position');
  68.   S^.Put(hcDeleteColumns, 'Delete the selected columns');
  69.   S^.Put(hcChangeHeaders, 'Custom assign a header to the selected columns');
  70.   S^.Put(hcDeleteHeaders, 'Delete custom assigned headers of the selected columns');
  71.   S^.Put(hcRowMenu, 'Row management commands');
  72.   S^.Put(hcInsertRows, 'Insert a row in the indicated position');
  73.   S^.Put(hcDeleteRows, 'Delete the selected rows');
  74.   S^.Put(hcSortData, 'Sort by columns the data in the spreadsheet');
  75.   S^.Put(hcWindowMenu, 'Window management commands');
  76.   S^.Put(hcTile, 'Arrange windows on desktop by tiling');
  77.   S^.Put(hcCascade, 'Arrange windows on desktop by cascading');
  78.   S^.Put(hcVideoMode, 'Toggle between 25 and 43/50 lines');
  79.   S^.Put(hcList, 'List all open windows on the desktop');
  80.   S^.Put(hcZoom, 'Enlarge or restore the size of the active window');
  81.   S^.Put(hcResize, 'Change the size or position of the active window');
  82.   S^.Put(hcNext, 'Make the next window active');
  83.   S^.Put(hcPrev, 'Make the previous window active');
  84.   S^.Put(hcLoadLicense, 'File containg important information (must read!)');
  85.   S^.Put(hcLoadTypes, 'Examples of the different cell type supported');
  86.   S^.Put(hcLoadFunctions, 'Examples of the different functions supported');
  87.   S^.Put(hcLoadList1, 'File explaining the use of headers and the sort method');
  88.   S^.Put(hcLoadList2, 'Example list (file EX_List2)');
  89.   S^.Put(hcLoadErrors, 'Examples of errors that can be detected');
  90.   S^.Put(hcLoadDataEntry, 'Examples of data entry screens');
  91.   S^.Put(hcLoadOOGL2, 'Information about next releases');
  92.   S^.Put(hcExampleFilesMenu, 'Example files documenting TSpreadSheet''s features');
  93.   S^.Put(hcRefresh, 'Redraw the screen');
  94.   S^.Put(hcInfoMenu, 'Copyrights, how to contact the author, etc.');
  95.   S^.Put(hcAbout, 'Copyright information');
  96.   S^.Put(hcAuthorInfo, 'Information about how to contact the author');
  97.   S^.Put(hcRegister, 'Registration information');
  98.   S^.Put(hcInfoDialog, 'Thanks for using OOGrid Library(TM) v1.0!');
  99.   S^.Put(hcChDir, 'Choose a new default directory...');
  100.  
  101.  
  102. { TSpreadSheet's Dialogs' Hints }
  103.  
  104.   S^.Put(hcBottomMargin, 'Lines to be left empty at the bottom of the page');
  105.   S^.Put(hcChangeHeaderInput, 'Enter the new custom header for the columns(s)');
  106.   S^.Put(hcCondensedCols, 'Number columns a page has in condensed size print mode');
  107.   S^.Put(hcCurrencyChar, 'Enter the character of the desired currency');
  108.   S^.Put(hcDecimalPlaces, 'Enter the desired number of decimal places of numbers');
  109.   S^.Put(hcFirstKey, 'The selected list will be sorted with this key first');
  110.   S^.Put(hcFormatDefault, 'Clears any custom assigned format of the selected cells');
  111.   S^.Put(hcGetWidthInput, 'Enter the new width for the column(s)');
  112.   S^.Put(hcGoToCellInput, 'Enter destination cell');
  113.   S^.Put(hcInputLine, 'Enter the data ( use a space before entering text )');
  114.   S^.Put(hcLeftMargin, 'Columns to be left empty at the left of the page');
  115.   S^.Put(hcNormalCols, 'Number of columns a page has in normal size print mode');
  116.   S^.Put(hcPageRows, 'Number of rows a page has');
  117.   S^.Put(hcRightMargin, 'Columns to be left empty at the right of the page');
  118.   S^.Put(hcSecondKey, 'Sort key used if two first keys are indentical');
  119.   S^.Put(hcThirdKey, 'Sort key used if two second keys are identical');
  120.   S^.Put(hcTopMargin, 'Lines to be left empty at the top of the page');
  121.   S^.Put(hcCopyColLiteral, 'Do not modify column references to reflect new position');
  122.   S^.Put(hcCopyRowLiteral, 'Do not modify row references to reflect new position');
  123.   S^.Put(hcCurrencyFormat, 'Show number with the indicated currency character');
  124.   S^.Put(hcPutCommasInNumbers, 'Put commas in the numbers');
  125.   S^.Put(hcJustLeft, 'Place the data at the left of the column');
  126.   S^.Put(hcJustCenter, 'Place the data at the center of the column');
  127.   S^.Put(hcJustRight, 'Place the data at the right of the column');
  128.   S^.Put(hcPrintToPrinter, 'Send output to printer device (PRN)');
  129.   S^.Put(hcPrintToFile, 'Send output to a file');
  130.   S^.Put(hcPrintNormal, 'Print the file in normal size mode');
  131.   S^.Put(hcPrintCondensed, 'Print the file in condensed size mode');
  132.   S^.Put(hcPrintRowsNo, 'Do not print row numbers');
  133.   S^.Put(hcPrintRowsLeft, 'Print row numbers only in pages at the left');
  134.   S^.Put(hcPrintRowsAlways, 'Print row numbers in all pages');
  135.   S^.Put(hcPrintColsNo, 'Do not print column headers');
  136.   S^.Put(hcPrintColsTop, 'Print column headers only in pages at the top');
  137.   S^.Put(hcPrintColsAlways, 'Print column headers in all pages');
  138.   S^.Put(hcLineOutline, 'Draw a row outline');
  139.   S^.Put(hcBoldBorders, 'Print column headers and row numbers in bold characters');
  140.   S^.Put(hcAscending, 'Sort the list in ascending order');
  141.   S^.Put(hcDescending, 'Sort the list in descending order');
  142.   S^.Put(hcPleaseWait, 'This may take some time... please wait');
  143.  
  144. { Message Strings }
  145.  
  146.   S^.Put(sHelpAccessError, 'Could not open help file.');
  147.   S^.Put(sNoMemError, 'There is not enough memory to continue operation.');
  148.   S^.Put(sShellMsg, 'Type EXIT to return to application...');
  149.   S^.Put(sNoNameFileName, 'NONAME');
  150.   S^.Put(sMaxFilesOpenError, 'Cannot open more files!');
  151.   S^.Put(sFileNotFound, 'File not found.');
  152.   S^.Put(sInvalidFormat, 'The file does not have a valid format.');
  153.   S^.Put(sAccessError, 'An error ocurred while accessing the file.');
  154.   S^.Put(sCreateStreamError, 'Could not create file.');
  155.   S^.Put(sSaveError, 'Error while saving file.');
  156.   S^.Put(sLoadMessage, 'Loading file... please wait.');
  157.   S^.Put(sSaveMessage, 'Saving file... please wait.');
  158.  
  159.   ResFile.Put(S, 'Strings');
  160.   Dispose(S, Done);
  161. end; {...CreateStrings }
  162.  
  163. procedure MakeMenuBar;
  164. var
  165.   R: TRect;
  166.   M: PMenuBar;
  167. begin
  168.   R.Assign(0,0,80,1);
  169.   M := New(PMenuBar, Init(R, NewMenu(
  170.     NewSubMenu('~F~ile', hcFileMenu, NewMenu(
  171.       NewItem('~N~ew', 'Alt-N', kbAltN, cmNewSheet, hcNewSheet,
  172.       NewItem('~O~pen', 'F3', kbF3, cmOpen, hcOpen,
  173.       NewItem('~S~ave', 'F2', kbF2, cmSave, hcSave,
  174.       NewItem('Save ~a~s', '', kbNoKey, cmSaveAs, hcSaveAs,
  175.       NewLine(
  176.       NewItem('~C~hange dir...', '', kbNoKey, cmChDir, hcChDir,
  177.       NewItem('~P~rint', 'Shift-F7', kbShiftF7, cmPrintSheet, hcPrintSheet,
  178.       NewLine(
  179.       NewItem('~D~os Shell...', '', kbNoKey, cmDosShell, hcDosShell,
  180.       NewItem('E~x~it', 'Alt-X', kbAltX, cmQuit, hcQuit,
  181.       NIL))))))))))),
  182.     NewSubMenu('~E~dit', hcEditMenu, NewMenu(
  183.       NewItem('~G~o to', 'Ctrl-Home', kbCtrlHome, cmGoToCell, hcGoTo,
  184.       NewItem('~E~dit cell', 'F1', kbF1, cmEditCell, hcEditCell,
  185.       NewLine(
  186.       NewItem('~C~opy', 'Ctrl-Ins', kbCtrlIns, cmCopy, hcCopy,
  187.       NewItem('~M~ove', 'Shift-Del', kbShiftDel, cmCut, hcMove,
  188.       NewItem('C~l~ear', 'Ctrl-Del', kbCtrlDel, cmClear, hcClear,
  189.       NewItem('~P~aste', 'Shift-Ins', kbShiftIns, cmPaste, hcPaste,
  190.       NIL)))))))),
  191.     NewSubMenu('~S~preadsheet', hcSpreadSheetMenu, NewMenu(
  192.       NewItem('~C~ell format', 'Shift-F1', kbShiftF1, cmFormatCells, hcFormatCells,
  193.       NewItem('~F~ormat default', '', kbNoKey, cmFormatDefault, hcFormatDefault,
  194.       NewLine(
  195.       NewItem('~R~ecalc', 'F9', kbF9, cmRecalc, hcRecalc,
  196.       NewItem('Toggle ~a~utocalc', 'Shift-F9', kbShiftF9, cmToggleAutocalc, hcToggleAutocalc,
  197.       NewItem('Toggle ~f~ormulas', 'Ctrl-F10', kbCtrlF10, cmToggleFormulas, hcToggleFormulas,
  198.       NewItem('Toggle ~h~eaders', 'Shift-F10', kbShiftF10, cmToggleHeaders, hcToggleHeaders,
  199.       NewSubMenu('~P~rotection', hcProtectionMenu, NewMenu(
  200.         NewItem('Toggle ~p~rotection', 'Alt-P', kbAltP, cmToggleProtection, hcToggleProtection,
  201.         NewItem('Set ~u~nlocked', 'Alt-U', kbAltU, cmSetUnlocked, hcSetUnlocked,
  202.         NewItem('Set ~l~ocked', 'Alt-L', kbAltL, cmSetLocked, hcSetLocked,
  203.         NIL)))),
  204.       NewLine(
  205.       NewSubMenu('C~o~lumn', hcColumnMenu, NewMenu(
  206.         NewItem('~I~nsert', 'Ctrl-F4', kbCtrlF4, cmInsertColumns, hcInsertColumns,
  207.         NewItem('~D~elete', 'Alt-F4', kbAltF4, cmDeleteColumns, hcDeleteColumns,
  208.         NewItem('~C~hange width', 'F7', kbF7, cmChangeColWidth, hcChangeColWidth,
  209.         NewItem('C~h~ange header', 'Ctrl-F7', kbCtrlF7, cmChangeColHeaders, hcChangeHeaders,
  210.         NewItem('~D~elete header', '', kbNoKey, cmDeleteColHeaders, hcDeleteHeaders,
  211.         NIL)))))),
  212.       NewSubMenu('Ro~w~', hcRowMenu, NewMenu(
  213.         NewItem('~I~nsert', 'Ctrl-F8', kbCtrlF8, cmInsertRows, hcInsertRows,
  214.         Newitem('~D~elete', 'Alt-F8', kbAltF8, cmDeleteRows, hcDeleteRows,
  215.         NIL))),
  216.       NewLine(
  217.       NewItem('~S~ort data', 'F4', kbF4, cmSortData, hcSortData,
  218.       NIL)))))))))))))),
  219.     NewSubMenu('Ex~a~mple Files', hcExampleFilesMenu, NewMenu(
  220.       NewItem('~C~ell Types', '', kbNoKey, cmLoadTypes, hcLoadTypes,
  221.       NewItem('~F~unctions', '', kbNoKey, cmLoadFunctions, hcLoadFunctions,
  222.       NewItem('L~i~st', '', kbNoKey, cmLoadList1, hcLoadList1,
  223.       NewItem('List ~e~xample', '', kbNoKey, cmLoadList2, hcLoadList2,
  224.       NewItem('E~r~rors', '', kbNoKey, cmLoadErrors, hcLoadErrors,
  225.       NewItem('~D~ata entry', '', kbNoKey, cmLoadDataEntry, hcLoadDataEntry,
  226.       NIL))))))),
  227.     NewSubMenu('~W~indow', hcWindowMenu, NewMenu(
  228.       NewItem('~T~ile', '', kbNoKey, cmTile, hcTile,
  229.       NewItem('C~a~scade', '', kbNoKey, cmCascade, hcCascade,
  230.       NewItem('~C~lose', 'Alt-F3', kbAltF3, cmClose, hcClose,
  231.       NewItem('Cl~o~se all', '', kbNoKey, cmCloseAll, hcCloseAll,
  232.       NewItem('~R~efresh display', '', kbNoKey, cmRefresh, hcRefresh,
  233.       NewLine(
  234.       NewItem('~S~ize/Move', 'Ctrl-F5', kbCtrlF5, cmResize, hcResize,
  235.       NewItem('~Z~oom', 'F5', kbF5, cmZoom, hcZoom,
  236.       NewItem('~N~ext', 'F6', kbF6, cmNext, hcNext,
  237.       NewItem('~P~revious', 'Shift-F6', kbShiftF6, cmPrev, hcPrev,
  238.       NewLine(
  239.       NewItem('~V~ideo Mode', '', kbNoKey, cmVideoMode, hcVideoMode,
  240.       NewItem('~L~ist', 'Alt-0', kbAlt0, cmList, hcList,
  241.       NIL)))))))))))))),
  242.     NewSubMenu('~I~nfo', hcInfoMenu, NewMenu(
  243.       NewItem('~A~bout...', 'Alt-F1', kbAltF1, cmAbout, hcAbout,
  244.       NewItem('A~u~thor...', '', kbNoKey, cmAuthorInfo, hcAuthorInfo,
  245.       NewItem('~R~egistration', '', kbNoKey, cmRegister, hcRegister,
  246.       NIL)))),
  247.     NIL)))))))));
  248.  
  249.   ResFile.Put(M, 'MenuBar');
  250.   Dispose(M, Done);
  251. end; {...MakeMenuBar }
  252.  
  253. procedure MakeLoadDialog;
  254. var
  255.   Dialog : PFileDialog;
  256. begin
  257.   Dialog := New(PFileDialog, Init('*.OGL', 'Open a file...', '~N~ame',
  258.     fdOkButton + fdHelpButton + fdNoLoadDir, 1));
  259.  
  260.   ResFile.Put(Dialog, 'LoadDialog');
  261.   Dispose(Dialog, Done);
  262. end; {...MakeLoadDialog }
  263.  
  264. procedure MakeChDirDialog;
  265. var
  266.   Dialog : PChDirDialog;
  267. begin
  268.   Dialog := New(PChDirDialog, Init(cdHelpButton + cdNoLoadDir, 3));
  269.  
  270.   ResFile.Put(Dialog, 'ChDirDialog');
  271.   Dispose(Dialog, Done);
  272. end; {...MakeChDirDialog }
  273.  
  274. procedure MakeSaveDialog;
  275. var
  276.   Dialog : PFileDialog;
  277. begin
  278.   Dialog := New(PFileDialog, Init('*.OGL', 'Save as...', '~S~ave as',
  279.     fdOkButton + fdHelpButton + fdNoLoadDir, 2));
  280.  
  281.   ResFile.Put(Dialog, 'SaveDialog');
  282.   Dispose(Dialog, Done);
  283. end; {...MakeLoadDialog }
  284.  
  285.  
  286. procedure MakeAboutDialog;
  287. var
  288.   Dlg : PDialog;
  289.   R : TRect;
  290.   Control, HScroll : PView;
  291. Begin
  292.   R.Assign(17,4,62,19);
  293.   New(Dlg, Init(R, 'About...'));
  294.   Dlg^.HelpCtx := hcInfoDialog;
  295.   Dlg^.Options := $0343;
  296.  
  297.   R.Assign(2,2,43,12);
  298.   Control := New(PStaticText, Init(R, ^C'OOGrid Library(TM) v1.1'^M+
  299.      ^C'for Borland/Turbo Pascal (Real Mode/TV)'^M+
  300.      ^C''^M+
  301.      ^C'Copyright (C) 1994, 1995'^M+
  302.      ^C'by Arturo J. Monge'^M+
  303.      ^C''^M+
  304.      ^C'Portions Copyright (C) 1989,1990'^M+
  305.      ^C'by Borland International, Inc.'^M+
  306.      ^C''));
  307.   Dlg^.Insert(Control);
  308.  
  309.   R.Assign(16,12,28,14);
  310.   Control := New(PButton, Init(R, 'O~k~', cmOk, bfNormal));
  311.   Dlg^.Insert(Control);
  312.  
  313.   Dlg^.SelectNext(False);
  314.  
  315.   ResFile.Put(Dlg, 'AboutDialog');
  316.   Dispose(Dlg, Done);
  317. end;
  318.  
  319. procedure MakeAuthorDialog;
  320. var
  321.   Dlg : PDialog;
  322.   R : TRect;
  323.   Control, HScroll : PView;
  324. Begin
  325. R.Assign(3,2,76,20);
  326. New(Dlg, Init(R, 'How to contact the author...'));
  327. Dlg^.HelpCtx := hcInfoDialog;
  328. Dlg^.Options := $0343;
  329.  
  330. R.Assign(2,2,71,6);
  331. Control := New(PStaticText, Init(R, 'Please feel free to contact the author '+
  332.      'at any time to share your comments about this software and/or licensin'+
  333.      'g policies, to ask any questions about the use of this library and (pl'+
  334.      'ease!) to report any bugs you may find.'));
  335. Dlg^.Insert(Control);
  336.  
  337. R.Assign(2,7,28,8);
  338. Control := New(PStaticText, Init(R, 'HOW TO CONTACT THE AUTHOR:'));
  339. Dlg^.Insert(Control);
  340.  
  341. R.Assign(2,9,42,12);
  342. Control := New(PStaticText, Init(R, 'E-Mail:'^M+
  343.      '  INTERNET: mongev@ns.fing.ucr.ac.cr '^M+
  344.      '  FREENET:  fh441@cleveland.freenet.edu'));
  345. Dlg^.Insert(Control);
  346.  
  347. R.Assign(44,9,71,13);
  348. Control := New(PStaticText, Init(R, 'Mail:'^M+
  349.      '  Arturo J. Monge'^M+
  350.      '  SJO 1684; POB 025216'^M+
  351.      '  Miami, FL 33102-5216'));
  352. Dlg^.Insert(Control);
  353.  
  354. R.Assign(2,14,42,16);
  355. Control := New(PStaticText, Init(R, 'Sending correspondence via electronic m'+
  356.      'ail is strongly preferred.'));
  357. Dlg^.Insert(Control);
  358.  
  359. R.Assign(53,15,66,17);
  360. Control := New(PButton, Init(R, 'O~k~', cmOk, bfDefault));
  361. Dlg^.Insert(Control);
  362.  
  363. Dlg^.SelectNext(False);
  364.  
  365. ResFile.Put(Dlg, 'AuthorDialog');
  366. Dispose(Dlg, Done);
  367. end;
  368.  
  369. procedure MakeRegistrationDialog;
  370. var
  371.   Dlg : PDialog;
  372.   R : TRect;
  373.   Control, HScroll : PView;
  374. Begin
  375. R.Assign(3,1,77,21);
  376. New(Dlg, Init(R, 'Registration Information...'));
  377. Dlg^.Options := $0343;
  378.  
  379. R.Assign(2,2,72,4);
  380. Control := New(PStaticText, Init(R, 'OOGrid Library(TM) v1.1 is being distri'+
  381.      'buted as freeware.  However, if you like OOGrid Library(TM) v1.1 and c'+
  382.      'ontinue to use it, or if you'^M+
  383.      ''));
  384. Dlg^.Insert(Control);
  385.  
  386. R.Assign(2,4,72,7);
  387. Control := New(PStaticText, Init(R, 'don''t like it for some reason but are '+
  388.      'interested in using an improved version, the author would greatly appr'+
  389.      'eciate it you registering as a user of this software.'));
  390. Dlg^.Insert(Control);
  391.  
  392. R.Assign(2,8,70,12);
  393. Control := New(PStaticText, Init(R, 'To register, simply send the author a l'+
  394.      'etter or an e-mail message with the following information:'^M+
  395.      ' a. Name, Company Name, mail address and e-mail address (if any)'^M+
  396.      ' b. OOGrid Library(TM) and pascal compiler versions being used'^M+
  397.      '  '));
  398. Dlg^.Insert(Control);
  399.  
  400. R.Assign(2,12,70,15);
  401. Control := New(PStaticText, Init(R, ' c. What you like about OOGrid Library('+
  402.      'TM)'^M+
  403.      ' d. What you dislike about OOGrid Library(TM)'^M+
  404.      ' e. What would you like to see in OOGrid Library(TM) v2.0 '));
  405. Dlg^.Insert(Control);
  406.  
  407. R.Assign(2,15,70,16);
  408. Control := New(PStaticText, Init(R, '    (for Turbo Vision and for Windows)'));
  409. Dlg^.Insert(Control);
  410.  
  411. R.Assign(57,17,70,19);
  412. Control := New(PButton, Init(R, 'O~k~', cmOk, bfDefault));
  413. Dlg^.Insert(Control);
  414.  
  415. R.Assign(2,17,30,18);
  416. Control := New(PStaticText, Init(R, 'Thank you for your support!'));
  417. Dlg^.Insert(Control);
  418.  
  419. Dlg^.SelectNext(False);
  420.  
  421. ResFile.Put(Dlg, 'RegistrationDialog');
  422. Dispose(Dlg, Done);
  423. end; { MakeRegistrationDialog }
  424.  
  425. const
  426.   ResourceFileName = 'DEMO_GL.TVR';
  427.  
  428. {****************************************************************************}
  429. {                               MAIN PROGRAM                                 }
  430. {****************************************************************************}
  431.  
  432. begin
  433.   RegisterDialogs;
  434.   RegisterViews;
  435.   RegisterGLViews;
  436.   RegisterStdDlg;
  437.   RegisterMenus;
  438.   RegisterType(RStrListMaker);
  439.  
  440.   write('Creating resource file...');
  441.   ResFile.Init(New(PBufStream, Init(ResourceFileName, stCreate, 1024)));
  442.   if ResFile.Stream^.Status <> stOk then
  443.   begin
  444.     writeln;
  445.     writeln ('Error creating the resource file... program aborted.');
  446.     halt(1);
  447.   end; {...if ResFile.Stream^.Status <> stOk }
  448.  
  449.   CreateStrings;
  450.   MakeMenuBar;
  451.   MakeLoadDialog;
  452.   MakeSaveDialog;
  453.   MakeAboutDialog;
  454.   MakeAuthorDialog;
  455.   MakeChDirDialog;
  456.   MakeRegistrationDialog;
  457.   CreateOOGLDialogs(@ResFile);
  458.   CreateOOGLStrings(@ResFile);
  459.  
  460.   if ResFile.Stream^.Status <> stOk then
  461.   begin
  462.     writeln;
  463.     writeln ('Error adding the resources... program aborted.');
  464.     halt(1);
  465.   end; {...if ResFile.Stream^.Status <> stOk }
  466.  
  467.   ResFile.Done;
  468.   writeln('done');
  469. end. {...Program DemoMake }